<!--#include file="pjson.asp"-->
<%
	Easp.NoCache
	vas "username",session("username")
	dim rs1
	set rs1=easp.db.sel("select * from zybm where [ID]={id}")
	setv "id1",rs1
	setv "zym",rs1
%>
<!DOCTYPE html>
<html>
<head>
<%easp.include "h.asp"%>
</head>
<body>
  <div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin" style="padding: 20px 0 0 0;">
<%
	Echo myjs1("input1.html","fieldn|id1,label|编号,"&"value|"&val("id1")&",required::|required")
	Echo myjs1("input1.html","fieldn|zym,label|中药别名,"&"value|"&val("zym")&",required::|required")
%>
	<input type="hidden" name="id" value="<%=val("id")%>">	
    <div class="layui-form-item layui-hide">
      <input type="button" lay-submit lay-filter="LAY-user-front-submit" id="LAY-user-front-submit" value="确认">
    </div>
  </div>

  <script src="/dzps/src/layuiadmin/layui/layui.js"></script>  
  <script>
  layui.config({
    base: '/dzps/src/layuiadmin/' 
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'set','form', 'upload'],function(){
    var $ = layui.$
    ,admin = layui.admin
    ,form = layui.form
	    ,upload = layui.upload;  
      form.on('submit(LAY-user-front-submit)', function(data){
      var field = data.field;
	  
      admin.req({
        url: layui.setter.base + 'lib/reg.asp?action=zybm_add' 
        ,data: field
        ,done: function(res){
			if(res.msg=='成功'){
				layer.msg(res.msg, {				offset: '15px'				,icon: 1				,time: 1000}, function(){			  });	
			}else{
				layer.msg(res.msg, {				offset: '15px'				,icon: 1				,time: 1000}, function(){			  });			
			}
        }
      });      
    });
  });
  </script>  
</body>
</html>